<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 规定字符出现次数 {m,n}m<=次数<=n，{m}只出现m次,{m,}次数>=m 量词默认是贪婪的-->
    <script>
        var pwd = "wjw628jdw13";
        var reg = /\d{4,}/;//返回false，注意：这里要是连在一起的四个数字，
        console.log(reg.test(pwd));
    </script>

<script>
    var a = "wjw62333";
    var b = /\d{1,3}/;//返回true，注意：这里只要其中有某个字段复合要求就可以
    // var b = /^\d{0,11}$/;
    console.log(b.test(a));
</script>
</body>
</html>